package com.kyh.sys.entity;


import java.util.Date;

import javax.persistence.Table;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="sys_role_button", catalog="role_button_id")
public class RoleButton extends BaseEntity<RoleButton> {

	@Model(nameTable="roleButtonId")
	private Long roleButtonId; // 主键ID
	@Model(nameTable="roleId")
	private Long roleId; // 角色ID
	@Model(nameTable="buttonId")
	private Long buttonId; // 按钮ID
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getRoleButtonId() {
		return roleButtonId;
	}
	public RoleButton setRoleButtonId(Long roleButtonId) {
		this.roleButtonId = roleButtonId;
		return this;
	}
	public Long getRoleId() {
		return roleId;
	}
	public RoleButton setRoleId(Long roleId) {
		this.roleId = roleId;
		return this;
	}
	public Long getButtonId() {
		return buttonId;
	}
	public RoleButton setButtonId(Long buttonId) {
		this.buttonId = buttonId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public RoleButton setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public RoleButton setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public RoleButton setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static RoleButton roleButton(
			Long roleId,
			Long buttonId,
			Integer status
			) {
		RoleButton entity = new RoleButton();
		entity.setRoleId(roleId);
		entity.setButtonId(buttonId);
		entity.setStatus(status);
		return entity;
	}
}